package myTest;

import java.net.URL;

import net.sf.ehcache.Cache;
import net.sf.ehcache.CacheManager;
import net.sf.ehcache.Element;


public class EhcaheTest {
	
	public static void main(String[] args) {
	    URL url = EhcaheTest.class.getResource("/ehcache.xml");  
	    CacheManager manager = CacheManager.create(url);  
		manager.addCache("testCache");  
		Cache test = manager.getCache("testCache");  
		test.put(new Element("key1", "value1"));  
		System.out.println(test.get("key1"));
		manager.shutdown(); 
	}

}
